Adição do Docker e do Dusk#81
Open
Dreamwanter5 wants to merge 4 commits into
Open
Conversation
Dreamwanter5
commented
Jun 1, 2026
- A dockerização não foi feita no FROM utilizando "latest" mas sim a versão 8.4 do PHP
- Está contido um teste simples do Dusk no arquivo "IndexTest.php"
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds Laravel Dusk browser testing scaffolding and Docker setup to run the app (and optionally browser tests) in containers.
Changes:
- Introduces Dusk base test case, example Dusk pages, and browser tests.
- Adds Dockerfile + docker-compose services for app + MariaDB + Selenium.
- Adds
.gitignoreplaceholders for Dusk artifacts (screenshots/console/source).
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/DuskTestCase.php | Adds Dusk test base class and RemoteWebDriver configuration. |
| tests/Browser/IndexTest.php | Adds a Dusk test asserting home page content. |
| tests/Browser/ExampleTest.php | Adds a sample Dusk test asserting home page content. |
| tests/Browser/Pages/Page.php | Adds base Dusk page class with shared selectors. |
| tests/Browser/Pages/HomePage.php | Adds Home page object with URL and selectors. |
| tests/Browser/source/.gitignore | Keeps Dusk source folder tracked while ignoring artifacts. |
| tests/Browser/screenshots/.gitignore | Keeps screenshots folder tracked while ignoring artifacts. |
| tests/Browser/console/.gitignore | Keeps console folder tracked while ignoring artifacts. |
| dockerfile | Adds an Apache/PHP container image build for the app. |
| docker-compose.yml | Adds services for app, MariaDB, and Selenium Chrome. |
| composer.json | Adds laravel/dusk dev dependency and reorders dev deps. |
Files not reviewed (1)
- .phpunit.cache/test-results: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+22
to
+24
| if (! static::runningInSail()) { | ||
| static::startChromeDriver(['--port=9515']); | ||
| } |
Comment on lines
+43
to
+45
| return RemoteWebDriver::create( | ||
| $_ENV['DUSK_DRIVER_URL'] ?? env('DUSK_DRIVER_URL') ?? 'http://localhost:9515', | ||
| DesiredCapabilities::chrome()->setCapability( |
Comment on lines
+17
to
+18
| environment: | ||
| HOME: /tmp |
Comment on lines
+35
to
+42
| selenium: | ||
| image: selenium/standalone-chrome | ||
| container_name: empresta_selenium | ||
| ports: | ||
| - "7900:7900" # VNC (pra ver o browser rodando) | ||
| networks: | ||
| - empresta-network | ||
| shm_size: 2gb |
| RUN sed -i 's|/var/www/html|/var/www/html/public|' \ | ||
| /etc/apache2/sites-available/000-default.conf | ||
|
|
||
| USER www-data |
| --optimize-autoloader \ | ||
| --no-interaction | ||
|
|
||
| CMD ["apache2-foreground"] |
|
|
||
| namespace Tests\Browser; | ||
|
|
||
| use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
||
| namespace Tests\Browser; | ||
|
|
||
| use Illuminate\Foundation\Testing\DatabaseMigrations; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.